 {

        var o = require("./UISoundManager.js"), i = require("./UIPopupBase.js");
        cc.Class({
            extends: i,
            properties: {
                goodBoyTitle: {
                    default: null,
                    type: cc.Node
                },
                prefabFanpai: cc.Prefab
            },
            init: function () {
            },
            onLoad: function () {
                this.drawLuckList = Global.utils.searchNode(this.node, "drawLuckList"), Global.notificationCenter.on(Global.eventName.MSG_HAPPYBAG5, this.ShowGameResult.bind(this), this);
                var e = Global.configCdn.getUISwitchConf();
                e && e.redPacketNums && e.redPacketNums.length > 0 ? this.redPacketNums = e.redPacketNums : this.redPacketNums = [.1, .2, .3];
            },
            start: function () {
                this.showItemAction();
            },
            showItemAction: function () {
                for (var e = this, t = function () {
                    var t = e.drawLuckList.getComponent(cc.Animation);
                    t.play("xipai"), t.on("finished", function () {
                        (function () {
                            for (var t = 0; t < e.redPacketNums.length; t++) {
                                var n = e.getItem(t);
                                if (n) {
                                    var o = n.getComponent(cc.Button);
                                    o && (cc.error("button.interactable = true"), o.interactable = !0);
                                }
                            }
                        })();
                    }.bind(this), this);
                }, n = 0; n < this.redPacketNums.length; n++) {
                    var o = this.getItem(n);
                    if (o) {
                        var i = o.getComponent(cc.Button);
                        i && (i.interactable = !1);
                        Global.utils.searchNode(o, "redPacket_1"), Global.utils.searchNode(o, "otherSide");
                        var a = Global.utils.searchNode(o, "fanpai");
                        if (a) {
                            var r = a.getComponent("NodeLuckyFanpai");
                            n == this.redPacketNums.length - 1 && r.setCallFunc(t), r && (r.updateTile(this.redPacketNums[n]),
                                r.setIsShine(!0), r.playFanPaiAnim());
                        }
                    }
                }
            },
            playAimationOnLoad: function () {
                var e = Global.utils.searchComp(this.node, "animation", cc.Animation);
                e && e.play();
            },
            getItem: function (e) {
                var t = void 0;
                return this.drawLuckList && e >= 0 && (t = this.drawLuckList.children[e]), t;
            },
            OnPanelClose: function () {
                o.playEffect("select"), this.closePanel();
            },
            ShowGameResult: function (e) {
                if (cc.log("ShowGameResult++++++++++++ = ", e), e && "getreward" == e.action && "show_rewards" == e.todotasks.action) {
                    var t = e.todotasks.params.rewards[0].count / 100;
                    this.goodBoyTitle.active = !0, this.scheduleOnce(function () {
                        this.goodBoyTitle.active = !1, this.closePanel(), Global.utils.showNodeCommon("你已获得" + t + "元微信红包，请到大厅提现查看！", 3);
                    }.bind(this), 4), cc.log("result.count++++++++++++ = count", t);
                    for (var n = [], o = 0; o < this.redPacketNums.length; o++) n.push(this.redPacketNums[o]);
                    for (var i = 0, a = 0; a < this.redPacketNums.length; a++) a == this.tempIndex && (i = this.redPacketNums[a]);
                    for (a = 0; a < this.redPacketNums.length; a++) this.redPacketNums[a] == t && (n[a] = i);
                    for (a = 0; a < this.redPacketNums.length; a++) {
                        var r = this.getItem(a);
                        if (r) {
                            var s = Global.utils.searchNode(r, "fanpai");
                            if (s) {
                                var l = s.getComponent("NodeLuckyFanpai");
                                if (a == this.tempIndex) {
                                    l.updateTile(t), l.playFanPaiFront();
                                    break;
                                }
                            }
                        }
                    }
                    this.scheduleOnce(function () {
                        for (var e = 0; e < this.redPacketNums.length; e++) {
                            var t = this.getItem(e);
                            if (t) {
                                var o = Global.utils.searchNode(t, "fanpai");
                                if (o) {
                                    var i = o.getComponent("NodeLuckyFanpai");
                                    if (e == this.tempIndex) continue;
                                    var a = n[e];
                                    i.updateTile(a), i.playFanPaiFront();
                                }
                            }
                        }
                    }.bind(this), 1);
                }
            },
            onClickRequest: function (e) {
                this.tempNode = e.target, this.tempIndex = this.tempNode.getSiblingIndex(), cc.log("onClickRequest++++++++++++++++++index= ", this.tempIndex);
                var t = (Global.configCdn.getActivityAndTaskConf() || Global.configCdn.getDefaultConfig("activityAndTask")).mySteriousRedPacket,
                    n = {
                        taskId: t[0].taskId,
                        kindId: t[0].kindId,
                        type: 0
                    };
                Global.msgHandler.requestGetTaskReward(n);
            }
        })
    }